﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// brief: 缓存类
#pragma once

#include "GmepComponentUtils.h"

class GMEP_COMPONENT_UTILS_EXPORT ProjectChangedCache
{
private:
    ProjectChangedCache();
    ~ProjectChangedCache();

public:
    bool GetProjectChangedIdListDuringTheTime(const std::wstring& projectId, std::map<std::wstring, int>&addedComponentIdList, std::map<std::wstring, int>& updateComponentIdList, std::map<std::wstring, int>& deletedComponentIdList);
    void Clear();

public:
    static ProjectChangedCache* GetInstance();

private:
    std::wstring m_projectId;

    std::map<std::wstring, int> m_addedComponentIdList;
    std::map<std::wstring, int> m_updateComponentIdList;
    std::map<std::wstring, int> m_deletedComponentIdList;
};
